package modelo.datos;


import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.CascadeType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Index;
import org.hibernate.annotations.IndexColumn;
import org.zkoss.zul.Image;

@Entity
@Table(name="portal",schema="public")
@PrimaryKeyJoinColumn(name="codportal")
public class portal {

	@Id
	@Column(name="codportal")
	private String codportal;
	
	@Column(name="nombre")
	private String nomportal;
	
	@Column(name="logo")
	private Image logo;
	
	@OneToMany(cascade= CascadeType.ALL)
	@JoinColumn(name="codportal")
	 private List<usuario> ListaUsu;
	 
	@OneToMany(cascade= CascadeType.ALL)
	@JoinColumn(name="codportal")
	 private List<aviso> ListaAvisos ;
	


public portal(String codportal,String nomportal,Image logo ){
	this.codportal=codportal;
	this.nomportal=nomportal;
	this.logo=logo;
	}



public String getCodportal() {
	return codportal;
}

public portal() {
	super();
}



public void setCodportal(String codportal) {
	this.codportal = codportal;
}

public String getNomportal() {
	return nomportal;
}

public void setNomportal(String nomportal) {
	this.nomportal = nomportal;
}

public Image getLogo() {
	return logo;
}

public void setLogo(Image logo) {
	this.logo = logo;
}
}
